package com.wjh.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wjh.common.BaseInfo;
import com.wjh.order.dto.OrderDetailDto;
import com.wjh.order.entity.OrderEntity;
import com.wjh.order.request.QueryOrderPageRequest;
import com.wjh.order.request.SaveOrderRequest;
import com.wjh.order.request.UpdateOrderPayStateRequest;

/**
 * 订单Service接口类
 * 
 * @author wenjianhai
 * @date 2023/6/22
 * @since JDK 17
 */
public interface IOrderService {
	/**
	 * 商品下单
	 *
	 * @date 2023-06-22
	 * @param request  下单请求参数
	 * @param baseInfo 下单人
	 * @since JDK 17
	 * @author wenjianhai
	 */
	void save(SaveOrderRequest request, BaseInfo baseInfo);

	Page<OrderEntity> page(QueryOrderPageRequest request);

	/**
	 * 查询订单及其详情
	 * 
	 * @date 2023-06-26
	 * @param orderGuid 订单Guid
	 * @return OrderDetailDto
	 * @since JDK 17
	 * @author wenjianhai
	 */
	OrderDetailDto queryOrderAndDetails(String orderGuid);

	void updatePayState(UpdateOrderPayStateRequest request);
}
